<template>
<div class="list_box">
  <div class="line_title">
    <span class="line_title_top">{{dataList['lineName']}}</span>
    <div class="dengBox">
<!--         <img src="~images/bigScreen/collectScreen/redDeng.png"/>-->
      <div class="boxItem boxItemLeft" :class="{'boxItemUS': isChina !== 'zh_CN'}">
        <template v-if="isChina === 'zh_CN'">
          <span class="text">{{$t('安灯待响应')}}</span>
          <span class="num">{{dataList['responded']}}</span>
        </template>
        <template v-else>
          <span class="num">{{dataList['responded']}}</span>
          <span class="text">{{$t('安灯待响应')}}</span>
        </template>
      </div>
      <div class="boxItem" :class="{'boxItemUS': isChina !== 'zh_CN'}">
        <template v-if="isChina === 'zh_CN'">
          <span class="text">{{$t('安灯处理中')}}</span>
          <span class="num">{{dataList['processing']}}</span>
        </template>
        <template v-else>
          <span class="num">{{dataList['processing']}}</span>
          <span class="text">{{$t('安灯处理中')}}</span>
        </template>
      </div>
    </div>
  </div>
 <div class="boxListbox">
<!--   <template v-for="item in dataList['dashboardDetailList']">-->
<!--     <div :key="item.andonNo" :class="{'box_item_red':Number(item.level) > 1,'box_item':true}">-->
<!--       <div class="item_top">-->
<!--             <span class="tonImg">-->
<!--                <template v-if="Number(item.level) > 1">-->
<!--                <span>-->
<!--                    <img :src="item.redImg"/>-->
<!--                 </span>-->
<!--               </template>-->
<!--              <template v-else>-->
<!--                 <template v-if="Number(item.andonStatus) === 0">-->
<!--                <span>-->
<!--                    <img :src="item.grayImg"/>-->
<!--                 </span>-->
<!--               </template>-->
<!--                <template v-if="Number(item.andonStatus) === 1">-->
<!--                 <span>-->
<!--                  <img :src="item.yellowImg"/>-->
<!--                 </span>-->
<!--               </template>-->
<!--              </template>-->
<!--             </span>-->
<!--         <div class="status-text" :class="{'topTextGray': Number(item.andonStatus) === 0,'topTextYellow': Number(item.andonStatus) === 1,'topText':true}">-->
<!--           <span  class="textTop">{{item.andonStatusStr}}</span></div>-->
<!--         <template v-if="Number(item.level) > 1">-->
<!--           <div :class="{'topTextGray': Number(item.andonStatus) === 0,'topTextYellow': Number(item.andonStatus) === 1,'topText':true}">-->
<!--             <span class="textTop">{{$t(`${item['issueType']}`)}}</span>-->
<!--             <span class="textBot">{{item.reasonCode}}</span>-->
<!--             <span class="textBot">{{item.reasonDesc}}</span>-->
<!--           </div>-->
<!--         </template>-->
<!--         <template v-else>-->
<!--           <div :class="{'topTextGray': Number(item.andonStatus) === 0,'topTextYellow': Number(item.andonStatus) === 1,'topText':true}">-->
<!--             <span class="textTop">{{$t(`${item['issueType']}`)}}</span>-->
<!--             <span class="textBot">{{item.reasonCode}}</span>-->
<!--             <span class="textBot">{{item.reasonDesc}}</span>-->
<!--           </div>-->
<!--         </template>-->
<!--       </div>-->
<!--       <div class="item_bot">-->
<!--         <div class="botLeft">-->
<!--           <div class="leftItem">-->
<!--             <span class="text">{{$t('安灯工站')}}</span>-->
<!--             <span class="info">{{item.workstation}}</span>-->
<!--           </div>-->
<!--           <div class="leftItem">-->
<!--             <span class="text">{{$t('操作员')}}</span>-->
<!--             <span class="info">{{item.operator}}</span>-->
<!--           </div>-->
<!--           <div class="leftItem">-->
<!--             <span class="text">{{$t('单号')}}</span>-->
<!--             <span class="info">{{item.andonNo}}</span>-->
<!--           </div>-->
<!--         </div>-->
<!--         <div class="botRight">-->
<!--           <div class="bot_item">-->
<!--             <div class="bot_item_top">{{$t('安灯响应时间')}}</div>-->
<!--             <div class="bot_item_bot">-->
<!--               <div class="bot_item_bot_top">-->
<!--                 <span class="text">{{item.responseTime}}</span>-->
<!--                 <span class="timeInfo">min</span>-->
<!--               </div>-->
<!--               <div class="bot_item_bot_ico" v-if="Number(item.andonStatus) === 0">-->
<!--                 <span>LV{{item.level}}</span>-->
<!--               </div>-->
<!--             </div>-->
<!--           </div>-->
<!--           <div class="bot_item">-->
<!--             <div class="bot_item_top">{{$t('处理时间')}}</div>-->
<!--             <div class="bot_item_bot">-->
<!--               <div class="bot_item_bot_top bot_item_bot_chu">-->
<!--                 <span class="text">{{item.processingTime}}</span>-->
<!--                 <span class="timeInfo">min</span>-->
<!--               </div>-->
<!--               <div class="bot_item_bot_ico" v-if="Number(item.andonStatus) === 1">-->
<!--                 <span>LV{{item.level}}</span>-->
<!--               </div>-->
<!--             </div>-->
<!--           </div>-->
<!--         </div>-->
<!--       </div>-->
<!--     </div>-->
<!--   </template>-->
   <vue-seamless-scroll :data="dataList['dashboardDetailList']"
                        class="seamless-warp size"
                        :class-option="classOption"
                        v-if="dataList['dashboardDetailList'].length > 0">
       <template v-for="item in dataList['dashboardDetailList']">
         <div :key="item.andonNo" :class="{'box_item_red':Number(item.level) > 1,'box_item':true}">
           <div class="item_top">
             <span class="tonImg">
                <template v-if="Number(item.level) > 1">
                <span>
                    <img :src="item.redImg"/>
                 </span>
               </template>
              <template v-else>
                 <template v-if="Number(item.andonStatus) === 0">
                <span>
                    <img :src="item.grayImg"/>
                 </span>
               </template>
                <template v-if="Number(item.andonStatus) === 1">
                 <span>
                  <img :src="item.yellowImg"/>
                 </span>
               </template>
              </template>
             </span>
             <div class="status-text" :class="{'topTextGray': Number(item.andonStatus) === 0,'topTextYellow': Number(item.andonStatus) === 1,'topText':true}">
               <span  class="textTop">{{item.andonStatusStr}}</span></div>
             <template v-if="Number(item.level) > 1">
               <div :class="{'topTextGray': Number(item.andonStatus) === 0,'topTextYellow': Number(item.andonStatus) === 1,'topText':true}">
                 <span class="textTop">{{$t(`${item['issueType']}`)}}</span>
                 <span class="textBot">{{item.reasonCode}}</span>
                 <span class="textBot">{{item.reasonDesc}}</span>
               </div>
             </template>
             <template v-else>
               <div :class="{'topTextGray': Number(item.andonStatus) === 0,'topTextYellow': Number(item.andonStatus) === 1,'topText':true}">
                 <span class="textTop">{{$t(`${item['issueType']}`)}}</span>
                 <span class="textBot">{{item.reasonCode}}</span>
                 <span class="textBot">{{item.reasonDesc}}</span>
               </div>
             </template>
           </div>
           <div class="item_bot">
             <div class="botLeft">
               <div class="leftItem">
                 <span class="text">{{$t('安灯工站')}}</span>
                 <span class="info">{{item.workstation}}</span>
               </div>
               <div class="leftItem">
                 <span class="text">{{$t('操作员')}}</span>
                 <span class="info">{{item.operator}}</span>
               </div>
               <div class="leftItem">
                 <span class="text">{{$t('单号')}}</span>
                 <span class="info">{{item.andonNo}}</span>
               </div>
             </div>
             <div class="botRight">
               <div class="bot_item">
                 <div class="bot_item_top">{{$t('安灯响应时间')}}</div>
                 <div class="bot_item_bot">
                   <div class="bot_item_bot_top">
                     <span class="text">{{item.responseTime}}</span>
                     <span class="timeInfo">min</span>
                   </div>
                   <div class="bot_item_bot_ico" v-if="Number(item.andonStatus) === 0">
                     <span>LV{{item.level}}</span>
                   </div>
                 </div>
               </div>
               <div class="bot_item">
                 <div class="bot_item_top">{{$t('处理时间')}}</div>
                 <div class="bot_item_bot">
                   <div class="bot_item_bot_top bot_item_bot_chu">
                     <span class="text">{{item.processingTime}}</span>
                     <span class="timeInfo">min</span>
                   </div>
                   <div class="bot_item_bot_ico" v-if="Number(item.andonStatus) === 1">
                     <span>LV{{item.level}}</span>
                   </div>
                 </div>
               </div>
             </div>
           </div>
         </div>
     </template>
   </vue-seamless-scroll>
 </div>
</div>
</template>

<script>
import vueSeamlessScroll from 'vue-seamless-scroll'
export default {
  name: "andoNcollectScreenList",
  props:['isChina','dataList'],
  components: {vueSeamlessScroll},
  computed: {
    classOption() {
      return {
        step: 0.3,
        limitMoveNum: 3,
        hoverStop: true,
        direction: 1,
        openWatch: true,
        singleHeight: 0,
        singleWidth: 0,
        waitTime: 1500
      }
    }
  },
}
</script>

<style scoped lang="scss">
::-webkit-scrollbar {
  display: none;
}
.list_box{
  width: 100%;
  height:100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  //padding: 0 10px;
  .line_title{
    width: 100%;
    height: 48px;
    display: flex;
    //justify-content: space-between;
    position: relative;
    align-items: center;
    .dengBox{
      //width: 80px;
      height: 52px;
      position: absolute;
      top:-2px;
      right: 0;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      .boxItemLeft{
        margin-right: 25px !important;
      }
      .boxItemUS{
        flex-direction: column;
      }
      .boxItem{
        display: flex;
        justify-content: flex-start;
        align-items: center;
        margin-right: 10px;
        .text{
          margin-right: 10px;
          font-size: 16px;
          font-family: SourceHanSansSC-Regular, SourceHanSansSC;
          font-weight: 400;
          color: rgba(212, 226, 255, 1);
        }
        .num{
          font-size: 16px;
          font-family: AlibabaPuHuiTi_2_115_Black;
          color: #DA3937;
        }
      }
      //img{
      //  width: 100%;
      //  height:100%;
      //}
    }
    .line_title_top{
      display: inline-block;
      margin-left: 60px;
      //font-size: 26px;
      //font-weight: bold;
      //margin-top: 5px;
      //color: #D4E2FF;
      //line-height: 67px;
      font-size: 24px;
      font-family: AlibabaPuHuiTi_2_115_Black;
      color: #D4E2FF;
      font-weight: 600;
    }
  }
  //overflow-y: scroll;
  background: url(~images/bigScreen/collectScreen/andonitembach.png) no-repeat;
  background-size:100% 100%;
  .boxListbox{
    margin-top: 15px;
    overflow: scroll;
    //overflow: hidden;
    height: calc(100% - 55px);
    display: block;
    text-align: center;
  }
  .box_item_red{
    background: url(~images/bigScreen/collectScreen/redbackimg.png) no-repeat !important;
  }
  .box_item{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    //margin-bottom: 80px;
    //background: url(~images/bigScreen/collectScreen/redbackimg.png) no-repeat;
    //background-size:100% 100%;
    padding: 0 10px;
    width: 100%;
    margin-top: 10px;
    //height: 222px;
    background: rgba(0,13,12,0.1);
    //border-radius: 8px;
    //opacity: 0.8;
    .item_bot{
      margin-top: -15px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .botLeft{
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        height: 184px;
        .leftItem{
          width: 274px;
          height: 55px;
          padding: 5px 10px;
          //background: linear-gradient(135deg, #254670 0%, #192C4F 100%);
          background-color: rgba(37, 70, 112,0.32);
          //opacity: 0.32;
          //margin-bottom: 5px;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: flex-start;
          .text{
            font-size: 16px;
            font-family: SourceHanSansSC-Regular, SourceHanSansSC;
            font-weight: 400;
            color: #FFB877;
          }
          .info{
            font-size: 16px;
            font-family: SourceHanSansSC-Bold, SourceHanSansSC;
            font-weight: bold;
            color: #D4E2FF;
          }
        }
      }
      .botRight{
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 184px;
        .bot_item{
          width: 166px;
          height: 87px;
          background: url(~images/bigScreen/collectScreen/timeBase.png) no-repeat;
          background-size:100% 100%;
          .bot_item_bot{
            height: 56px;
            width: 100%;
            position: relative;
            //padding: 9px 15px;
            //background: linear-gradient(135deg, #254670 0%, #192C4F 100%);
            //opacity: 0.32;
            display: flex;
            justify-content: center;
            align-items: center;
            .bot_item_bot_ico{
              width: 25px;
              height: 16px;
              background: rgba(245, 63, 63, 0.8);
              border-radius: 0 4px 0 6px;
              position: absolute;
              top: 9px;
              right: 13px;
              display: flex;
              justify-content: center;
              align-items: center;
              span{
                font-size: 12px;
                color: #ffffff;
              }
            }
            .bot_item_bot_chu{
              span.text{
                color: #FFEE02 !important;
              }
            }
            .bot_item_bot_top{
              //padding: 9px 15px;
              height: 28px;
              padding-top: 7px;
              //background: #000712;
              width: 166px;
              //border-radius: 4px;
              //border: 1px solid #0165FE;
              display: flex;
              justify-content: center;
              align-items: center;
              span.text{
                font-size: 28px;
                font-family: DigifaceWide;
                color: #F53F3F;
                line-height: 34px;
                text-shadow: 0px 1px 5px #C72725;
              }
              span.timeInfo{
                font-size: 16px;
                margin-left: 5px;
                margin-top: 10px;
                font-family: AlibabaPuHuiTi_2_55_Regular;
                color: #9EBDFA;
              }
            }
          }
          .bot_item_top{
            width: 100%;
            height: 28px;
            font-size: 14px;
            display: flex;
            align-items: center;
            color: #D4E2FF;
            padding-left:40px;
            //opacity: 1;
          }
        }
      }
    }
    .item_top{
      display: flex;
      justify-content: space-between;
      //align-items: center;
      padding-top: 15px;
      height: 100%;
      border-top: 1px solid #0165FE;
      //height: 78px;
      position: relative;
      .status-text{
        position: absolute;
        left: 185px;
      }
      .topTextRed{
        .textTop,.textBot{
          color: rgba(245, 63, 63, 1) !important;
        }
      }
      .topTextGray{
        .textTop,.textBot{
          color: rgba(158, 189, 250, 1) !important;
        }
      }
      .topTextYellow{
        .textTop,.textBot{
          color: rgba(250, 236, 12, 1) !important;
        }
      }
      .topText{
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        font-family: AlibabaPuHuiTi_2_115_Black;
        .textTop,.textBot{
          color: #00D68A;
        }
        .textTop{
          font-size: 24px;
          font-weight: bold;
        }
        .textBot{
          font-size: 19px;
        }
      }
      .tonImg{
        width: 121px;
        height: 112px;
        //height: 100%;
        background: url(~images/bigScreen/collectScreen/thebase.png) no-repeat;
        background-size:100% 100%;
        display: flex;
        justify-content: center;
        //align-items: center;
        span{
          display: block;
          width: 45px;
          height: 48px;
        }
        img{
          width: 100%;
          height: 100%;
        }
      }
    }
  }
}
</style>
